var behalfMaterial = {
	behalfMaterialId: '',
	elderId: '',
	materialId: '',
	quantity: '',
	totalRent: '',
	payWay: '',
	createTime: '',
	updateTime: '',
	createId: getLoginedUser()? getLoginedUser().staffId: '',
	updateId: getLoginedUser()? getLoginedUser().staffId: '',
	subjectRoomId: getLoginedUser().subjectRoomId,
	subjectRoomName: getLoginedUser().subjectRoomName
};

var behalf_material_view = {
	data: behalfMaterial
};

var behalf_material_vue_vm = new Vue({
	el: '#behalf_material_vue_vm',
	data: behalf_material_view
});

function behalf_material_save() {
	behalf_material_view.data.materialId = $('input:radio[name="materialId"]:checked').val();
	behalf_material_view.data.quantity = (behalf_material_view.data.quantity==''? 0: parseInt(behalf_material_view.data.quantity));
	behalf_material_view.data.totalRent = (behalf_material_view.data.totalRent==''? 0: parseFloat(behalf_material_view.data.totalRent));
	behalf_material_view.data.payWay = (behalf_material_view.data.payWay==''? 0: parseInt(behalf_material_view.data.payWay));

	save_basic(path+'/behalfMaterial/save', {behalfMaterial:behalf_material_view.data}, function(behalfMaterialId) {
		alert('保存成功');
		window.open('6-2-4dgyongpin-1.html?behalfMaterialId=' + behalfMaterialId);
	});
}